# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=libmpdclient
pkgver=2.15
pkgrel=1
pkgdesc='Asynchronous API library for interfacing MPD in the C, C++ & Objective C languages'
url='https://www.musicpd.org/libs/libmpdclient/'
license=('custom:BSD')
arch=('x86_64')
makedepends=('meson')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("https://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha256sums=('b4dbf6f9fd99e8e7c183cb3b7de75ee4ac14d92ca43e9a99bef09168b20246d1'
            'SKIP')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	arch-meson . build
	ninja -C build
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	DESTDIR="${pkgdir}" ninja -C build install

	cd "${pkgdir}"
	install -d usr/share/licenses/libmpdclient
	ln -s ../../doc/libmpdclient/COPYING usr/share/licenses/libmpdclient/COPYING
}
